wordpress 

WordPress: “Too many redirects” not able to access the dashboard

In WordPress “Too many redirects” error might occur in multiple cases, below are some solutions.

Solution #1:

Too many redirects. Clear all browser cache, cookies and saved data, if you are using and CDN in between like cloudflare / cloudfront the purge cache and check.

Note: Before trying next solution please take a full backup of the site with database and then try.

Solution #2:

Try disabling the “.htaccess” file by renaming it. or try to disable all plugins by renaming wp-content->plugins folder to something else. if still not able to access dashboard or homepage, then try the next solution.

Solution #3:

In case you don’t have access to WordPress Admin area, you can still update these settings by defining them in wp-config.php file. Simply connect to your website using an FTP client. Once you are connected to your site, you will find wp-config.php file in your site’s root directory.  Modify the “wp-config.php” page by updating the site url as below.

define('WP_HOME' , 'yoursitename');
define('WP_SITEURL' , 'yoursitename');

or the same thing can also be done in the database too. Goto-> MySQL PHPMyAdmin and select your database -> then find table name “wp_options”-> and find “siteurl” and “home” rows in “option_name” column and edit your URLs.

Solution #4:

“Reverse proxy” If our WordPress site is hosted under a reverse proxy server that provides SSL, but is hosted itself without SSL, these options will initially send any requests into an infinite redirect loop. To avoid this, you may configure WordPress to recognize the HTTP_X_FORWARDED_PROTO header.

To add this below goto the “wp-config.php” file and add this below reverse proxy code snippet at the top. source

if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false){
   $_SERVER['HTTPS']='on';
} else {
   $_SERVER['HTTPS']='off';
}

Tell us by commenting below, which solution solved your problem.

Related posts